$(document).ready(function() {

var plist=[];
$('#awplus_content table:eq(0) tr[@bgcolor=#404040] a').each(function() {
  plist.push($(this).attr('href').match(/([0-9]+)$/)[1] +':'+$(this).text());
});

if (!$.cookie('ap_planetlist')) {
  for (i in plist) {
    t = plist[i].split(':');
    $('#planets').addmenu(t[1], '/0/Planets/Detail.php/?i='+t[0]);
  }
}
$.cookie('ap_planetlist', plist.join('|'), {expires: 1, path: '/'});

});
